<?php
namespace app\common\validate;
use think\Validate;
class Lease extends Validate{
    protected $rule = [
        'busid' => ['require'],
        'proid' => ['require'],
        'price' => ['require','egt:0'],
        'endtime' => ['require'],
        'province' => ['require'],
        'city' => ['require'],
        'district' => ['require'],
        'address' => ['require'],
        'card'=>['require'],
        'status' => ['require'],
    ];

    // 错误提示信息
    protected $message = [
        'busid.require' => '用户id必填',
        'proid.require' => '商品ID未知',
        'price.require' => '请填写租赁商品的价格',
        'price.egt'=>'租赁价格小于0',
        'endtime.require' => '租用的结束时间必须填写',
        'address'=>'用户的详细地址必须填写',
        'province.require' => '省份必填',
        'city.require' => '城市必填',
        'district.require' => '区域必填',
        'card.require' => '证件照必须填写',
        'status.require' => '状态必须填写'
    ];
}